<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAssetsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('assets', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('customer_id')->unsigned()->default(0)->comment('客户ID');
			$table->integer('category_id')->unsigned()->default(0)->comment('分类ID');
			$table->integer('store_id')->unsigned()->default(0)->comment('店铺ID');
			$table->string('code')->default('')->comment('素材编号');
			$table->text('model_xml', 65535)->comment('模型文件（必须）');
			$table->integer('version')->unsigned()->default(0)->comment('版本号');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('assets');
	}

}
